package top.guxx.springframework.beans.factory;

import top.guxx.springframework.beans.BeansException;
import top.guxx.springframework.beans.factory.config.BeanDefinition;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Author：Guxx
 * @Description：
 * @Date：2024/6/8 21:08
 * @Filename：BeanFactory
 */
public interface BeanFactory {
    Map<String, BeanDefinition> beanDefinitionMap = new ConcurrentHashMap<>();
    /*Object getBean(String beanName);*/
    Object getBean(String beanName, Object... args) throws BeansException;
    Object getBean(String name) throws BeansException;
    <T> T getBean(String name, Class<T> requiredType) throws BeansException;
    void registerBeanDefinition(String beanName, BeanDefinition beanDefinition);
}
